//
//  BaseManager.h
//  carcareIOS
//
//  Created by ileo on 16/8/25.
//  Copyright © 2016年 chezheng. All rights reserved.
//

#import <Foundation/Foundation.h>

#pragma mark - 接收更新消息
typedef NS_ENUM(NSUInteger, ReceiveUpdateType){
    ReceiveUpdateNone = 0,         //没有啦
    ReceiveAccountUpdate = 1 << 0, //收到账户切换消息
    ReceiveVersionUpdate = 1 << 1, //收到版本升级消息
    ReceiveDateUpdate    = 1 << 2  //收到日期更新消息
};
static inline BOOL receiveUpdateContain(ReceiveUpdateType full, ReceiveUpdateType single) { return (full & single) == single;}


#pragma mark - 初始化状态
typedef NS_ENUM(NSUInteger, ManagerDataStatus){
    ManagerDataNone = 0,      //不需要初始化数据
    ManagerDataIniting,       //初始化数据中
    ManagerDataInitSuccess,   //初始化数据完成
    ManagerDataInitFail       //初始化数据失败
};

@interface BaseManager : NSObject

@property (nonatomic, assign) ManagerDataStatus initStatus;//初始化数据状态



#pragma mark - 接收消息回调
//收到账户登出消息
-(void)didReceiveAccountLogout;
//收到内存警告消息
-(void)didReceiveMemoryWarning;
//收到信息更新消息
-(void)didReceiveUpdate:(ReceiveUpdateType)updateType;

@end



